begintownscript;

 begintownscript;	

 variables;
int i,j,k,r1,choice;
body;
beginstate INIT_STATE;
	if (get_flag(3,3) == 0) {
		force_instant_terrain_redraw();
		reset_dialog();
		add_dialog_str(0,"Your body hits a slippery slope. It is so slippery and steep that you can barely even slow down your descent. You slide down the slope in absolute darkness for about five seconds before the slope spits you out into a more open cave.",0);
		add_dialog_str(1,"You land painfully on a surface which crunches as it receives you. You are lying on a pile of bones. The pile consists of both ogre and reptile bones. You try to squint and make out your surroundings in the darkness.",0);
		add_dialog_str(2,"It seems that, for the moment at least, you are alone.",0);
		run_dialog(1);
		change_outdoor_location(0,0,9,22);
		set_flag(3,3,1);
}

	if (get_flag(3,1) == 5)
		erase_char(6);
	 break;	

beginstate START_STATE;
	if ((get_flag(3,1) == 1) && (char_ok(12) == FALSE))
		set_flag(3,1,5);
break;	

beginstate EXIT_STATE;
	if (get_flag(3,2) == 0) {
		set_town_visibility(3,1);
		set_flag(3,2,1);
}
	if (get_flag(3,2) == 2)
		set_town_visibility(3,1);

	if ((get_flag(3,1) == 1) && (char_ok(12) == TRUE))
		set_flag(3,1,2);
break;

beginstate 10;
	if ((get_flag(3,1) == 0) && (char_ok(6) == TRUE)) {
		message_dialog("A furious reptilian scream cuts through the silence. It originated about fifty feet in front of you. You also see five ogre brutes gathered around a fire ahead of you. They react quickly to the scream, barking orders at each other.","They are obviously scared. Just as each ogre reaches for its weapons a huge lizard crawls out of a passage from the south. It turns its head towards the ogres, quickly tastes the air with its tongue, and attacks.");
		activate_hidden_group(1);
		erase_char(6);
		set_flag(3,1,1);
		set_flag(3,5,1);
}
 break;

beginstate 11;
	if (get_flag(3,4) == 0) {
		set_flag(3,4,1);
		message_dialog("It is very humid. Miniature steam-puffing volcanoes litter the cave floor here and there and everywhere. The humidity caused by them has created pockets of swamp around the cave, which in turn have provided life for a few stunted trees.","The warmth of the volcanoes has in turn attracted huge insects and they have attracted giant lizards. Many reptilian heads turn in your direction, taste the air with their tongues and lunge at you.");
}
 break;

beginstate 12;
	if (char_ok(6) == TRUE)
		relocate_character(6,25,18);

	if ((get_flag(3,5) == 1) && (char_ok(6) == TRUE))
		print_str_color("You hear something huge drag itself ahead of you!",2);

	if (get_flag(3,5) == 0) {
		reset_dialog();
		add_dialog_str(0,"You stop to listen. This small passage forks north and you can clearly hear singing from there. You count at most a half a dozen different low voices passing the time, furiously singing away the time.",0);
		add_dialog_str(1,"_Singing_ might not be the best term to describe the rage-filled chanting you hear. The ogres performance reaches a quiet part and during it you hear something else. Only a few yards away from you, behind a corner, some large animal is moving.",0);
		add_dialog_str(2,"Some extremely large animal.",0);
		run_dialog(1);
		set_flag(3,5,1);
}
 break;

beginstate 13;
	if (get_flag(3,6) == 0) {
		message_dialog("These lizards should not have wandered here it seems. Dead giant lizards have been scattered on the ground in front of you. The flesh has more or less been eaten from them. There does not appear to be anything dangerous in this cave.","Flies the size of your thumb buzz around the corpses. Suddenly the sound of their buzzing cuts in half. Then it begins anew as the flies begin to form into one big mass of flies like something was compelling them to do so!");
		set_flag(3,6,1);
		activate_hidden_group(2);
}
 break;

beginstate 14;

	if ((get_flag(3,5) == 1) && (char_ok(6) == TRUE))
		print_str_color("You hear something huge drags itself ahead of you!",2);

	if (get_flag(3,5) == 0) {
		reset_dialog();
		add_dialog_str(0,"You stop to listen. This small passage forks north and you can clearly hear singing from there. You count at most a half a dozen different low voices passing the time, furiously singing away the time.",0);
		add_dialog_str(1,"_Singing_ might not be the best term to describe the rage-filled chanting you hear. The ogres performance reaches a quiet part and during it you hear something else. Only a few yards away from you, behind a corner, some large animal is moving.",0);
		add_dialog_str(2,"Some extremely large animal.",0);
		run_dialog(1);
		set_flag(3,5,1);
}
	if (char_ok(6) == TRUE)
		relocate_character(6,24,19);
 break;

beginstate 15;
	if (get_flag(3,7) == 0) {
		message_dialog("You find a dead ogre. Looking at its many wounds it is easy to determine what killed it: lizards. Claw marks and gashes made by sharp teeth cover its unprotected body. The corpse looks rather fresh and the ogre looks rather young.","You do not know what it was doing in these caves, but they became its grave.");
		set_flag(3,7,1);
}
 break;
